//
//  ZHPlayListTableViewCell.m
//  XMLYFM
//
//  Created by dllo on 15/12/28.
//  Copyright © 2015年 zzl. All rights reserved.
//

#import "ZHPlayListTableViewCell.h"
#import "Masonry.h"

@implementation ZHPlayListTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self createView];
    }
    
    return self;
}

- (void)createView{
    
    _newsPic = [[UIImageView alloc] init];
    _newsPic.backgroundColor = [UIColor clearColor];
    _newsPic.layer.masksToBounds = YES;
    _newsPic.layer.cornerRadius = SCREEN_WIDTH_ZH*0.05;
    [self.contentView addSubview:_newsPic];
    
    _newsTitle = [[UILabel alloc] init];
//    self.newsTitle.backgroundColor = [UIColor];
    [self.contentView addSubview:_newsTitle];
    
    [_newsPic mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.top.mas_equalTo(@8);
        make.size.mas_equalTo(CGSizeMake(40, 40));
    }];
    [_newsTitle mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.equalTo(_newsPic);
        make.left.equalTo(_newsPic.mas_right).offset(5);
        make.right.mas_equalTo(@(-20));
        make.height.mas_equalTo(@35);
    }];
//    _newsPic.backgroundColor = [UIColor redColor];
//    _newsTitle.backgroundColor = [UIColor redColor];
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
